package com.zp2.controller.admin;

import com.zp2.model.user.UserLoginVo;
import com.zp2.model.vo.AdminsLoginVo;
import com.zp2.service.UserService;
import com.zp2.util.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin")
@CrossOrigin(origins = "*")
public class AdminController {
    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public Result getAdminInfo(@RequestBody AdminsLoginVo adminsLoginVo) {
        return userService.getAdminInfo(adminsLoginVo);
    }
}
